
"""
章节：研究的内容是 继承

"""

# 定义小鸟类
class Bird:
     name=None
     sex=None


class Animal:
     age=None


class Eagle (Bird,Animal):
     sex = "男"
     age = 18

class Small:
   # pass表示完整性，无任何含义
    pass






print("----------重写父类中的方法和成员变量的值------------")

class Phone:
     name="iphone5"
     price=12000

     def pre(self):
          print(f"父类打印:手机名称:{self.name} 价格:{self.price}")


class MyPhone(Phone):
    name="huawei"
    price=3999

    def pre(self):
         print(f"子类打印: 手机名称:{self.name} 价格:{self.price}")


    def prd(self):
         Phone.name="iphone11"
         Phone.price=200

         super().pre()

mypone=MyPhone()
mypone.pre()
mypone.prd()